<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>表单总结</title>

    <style type="text/css">
        * {
            padding: 0;
            margin: 0;
        }

        form {
            width: 600px;
            margin: 20px auto;
        }

        form>fieldset {
            padding: 10px;
        }

        form>fieldset>input {
            width: 100%;
            height: 40px;
            line-height: 40px;
            margin: 10px 0;
            border: none;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 16px;
            padding-left: 8px;
            /* width=内容+宽度+边距+内间距 */
            box-sizing: border-box;
        }

        form>fieldset>meter {
            width: 100%;
            height: 30px;
            margin: 10px 0;
        }
    </style>


</head>

<body>


    <form action="" method="">
        <fieldset>
            <legend> 学生档案 </legend>


            <label for="userName">姓名:</label>
            <input type="text" name="userName" id="userName" placeholder="请输入姓名">
            <br>

            <label for="userTel">手机号码:</label>
            <input type="tel" name="userTel" id="userTel" placeholder="请输入手机号" required pattern="^(\+86)?1\d{10}$">
            <br>

            <label for="userEmail">邮箱地址:</label>
            <input type="email" name="userEmail" id="userEmail" placeholder="请输入邮箱地址" multiple>
            <br>

            <label for="userXy">所属学院:</label>
            <input type="text" list="subjects" name="userXy" id="userXy" placeholder="请选择">
            <datalist id="subjects">
                <option value="java" label="懒洋洋">
                    <option value="HTML" label="喜洋洋">
                        <option value="Swift" label="大灰狼">
                            <option value="C++" label="...">

            </datalist>
            <br>

            <label for="userNumber">入学成绩:</label>
            <input type="number" name="userNumber" id="userNumber" value="0" min="0" max="100">
            <br>

            <label for="myMeter">基础水平:</label>
            <meter max="100" min="0" value="0" high="90" low="59" name="myMeter" id="myMeter"></meter>
            <br>


            <label for="dateTypeRx">入学日期:</label>
            <input type="date" name="dateTypeRx" id="dateTypeRx">
            <br>

            <label for="dateTypeBy">毕业日期:</label>
            <input type="date" name="dateTypeBy" id="dateTypeBy">
            <br>
            <br>
            <br>
            <br>

            <input type="submit" value="提交" name="submitButton" id="submitButton">
            <br>
        </fieldset>

        <script type="text/javascript">
            // oninput: 监听输入框输入
            document.getElementById("userNumber").oninput = function () {
                console.log(this.value)
                document.getElementById("myMeter").value = this.value

            }
        </script>
    </form>


</body>

</html>
